<?php
// Filename: pam/view/pam/healthpolicy/view.phtml
$title = $policy->policy_name;
$this->headTitle($title);
?>

<h1><?php echo $this->escapeHtml($title) . ' of ' . ($policy->policy_date ? $policy->policy_date : '...'); ?></h1>
<p><?php echo $this->escapeHtml($policy->policy_description); ?></p>
<a href="<?php echo $this->url('health', array('action' => 'editPolicy')); ?>"> Edit policy details  </a>
<?php if (count($goals) > 1): ?>
<h3>Objectives/Goals of the <?php echo $this->escapeHtml($title); ?></h3>
<ul>
    <?php if (count($goals) < 1): ?>
        <li> <?php echo 'None added'; ?></li> 
    <?php endif; ?>
    <?php foreach ($goals as $goal) : ?>
        <li><?php echo $this->escapeHtml($goal->policy_goal); ?></li>
    <?php endforeach; ?>
</ul>
<?php endif; ?>

<br />
<p>
    <a href="<?php echo $this->url('health', array('action' => 'print')); ?>">Print health policy report</a><br>
    <a href="<?php echo $this->url('health', array('action' => 'add')); ?>">Add new health policy statement</a>
</p>

<table class="table">
    <tr>
        <th>Title</th>
        <th>Description</th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
    </tr>
    <?php foreach ($healthpolicies as $sp) : ?>
        <tr>
            <td><?php echo $this->escapeHtml($sp->issue_title); ?></td>
            <td><?php echo $this->escapeHtml($sp->description); ?></td>
            <td><a href="<?php echo $this->url('health-indicators', array('id' => $sp->id, 'action' => 'view'));
        ?>">View Indicators</a></td>
            <td>
                <a href="<?php echo $this->url('health', array('action' => 'edit', 'id' => $sp->id));
        ?>">Edit</a>
                <a href="<?php echo $this->url('health', array('action' => 'delete', 'id' => $sp->id));
        ?>">Delete</a>
            </td>
        </tr>
    <?php endforeach; ?>
</table>

